import request from "@/utils/service.js"



// 查询列表
export let chaxun = (page, limit) => {
    return request({
        url: "/findMessage",
        method: "GET",
        params: {
            page,
            limit
        }
    })
}
// 学科列表
export let xklb = () => {
    return request({
        url: '/findSubject',
        method: 'GET',
        params: {
            page: 1,
            limit: 5
        }
    })
}

// 删除
export let dellist = (id) => {
    return request({
        url: `/deleteSubject/${id}`,
        method: 'DELETE',
        params: {
            id
        }
    })
}

// 用户日志
export let yhrz = () => {
    return request({
        url: "/findLog",
        method: "GET",
        params: {
            page: 1,
            limit: 5
        }
    })
}
// 日志查询

export let rzcx = (page, limit, logId, logUsername) => {
    return request({
        url: "/findAllBypageAndNameLike",
        method: "GET",
        params: {
            page,
            limit,
            logId,
            logUsername
        }
    })
}



// 消息中心发送
export let xiaoxifasong = (messageTittle, messageInfo, messageSender, messageCreateTime) => {
    return request({
        url: "/insertMessage",
        method: "POST",
        data: {
            messageTittle,
            messageInfo,
            messageSender,
            messageCreateTime
        }
    })
}




// 登录
export let denglu = (adminUsername,adminPassword) => {
    return request({
        url: "/adminlogin",
        method: "GET",
        params: {
            adminUsername,
            adminPassword
        },
    })
}


// 消息列表查询
export let getlink = (keyword) => {
    return request({
        url: `/messageLike/${keyword}`,
        method: "GET",
        params: {
            keyword
        }
    })
}
